<script lang="ts" setup>
  import { ref } from 'vue';
  import Alert from '@sscd/alert';
  const visible = ref<boolean>(true);
  const onAlertClose = () => {
    visible.value = false;
  };
</script>

<template>
  <div class="demo">
    <div class="demo-title">平滑地卸载</div>
    <div class="demo-content">
      <Alert
        v-if="visible"
        message="Alert Message Text"
        type="success"
        closable
        :after-close="onAlertClose"
      />
    </div>
  </div>
</template>
